﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<EnterpriseManagement.Models.ProjectDetailsModel>" %>
<%--<style type="text/css">
input[type="text"] 
{
	margin-left:auto;
    width: 100px;
    overflow:auto;
    height:auto;
    margin:0px;
    font-size :8px;
    padding:0px;
}
</style>--%>


<div id="updatedproject">
<%--<table class ="noframe">
<tr>
    <td class="display-field"><%: Html.TextBox(Model.ProjectName ,Model.ProjectName ) %></td> 
    <td class="display-field"><%: Html.TextBox(Model.ProjectType,Model.ProjectType)%></td>
    <td class="display-field"><%: Html.TextBox(Model.Importance,Model.Importance)%></td>
    <td class="display-field"><%: Html.TextBox(Model.MainTechnology,Model.MainTechnology)%></td>
    <td class="display-field"><%: Html.TextBox(Model.StartTime,Model.StartTime ) %></td>
    <td class="display-field"><%: Html.TextBox(Model.EndTime,Model.EndTime)%></td>
    <td class="display-field"><%: Html.TextBox(Model.BusinessField,Model.BusinessField) %></td>
    <td class="display-field"><%: Html.TextBox(Model.ClientName,Model.ClientName )%></td>
    <td class="display-field"><%: Html.TextBox(Model.Department,Model.Department)%></td>
    <td class="display-field"><%: Html.TextBox(Model.Manager,Model.Manager)%></td>
    <td class="display-field"><%: Html.TextBox(Model.NumberOfPeople.ToString (),Model.NumberOfPeople.ToString ())%></td>
    <td class="display-field"><%: Html.TextBox(Model.ProjectStatus,Model.ProjectStatus)%></td>
    <td id="tdnoline"><%:Ajax.ActionLink("保存修改", "UpdateProject", new { id = Model.ProjectName.Trim() }, new AjaxOptions { UpdateTargetId = "updatedproject", HttpMethod = "GET" })%></td>
</tr>           
</table>--%>

 <% using (Ajax.BeginForm("UpdateProject", new AjaxOptions { UpdateTargetId = "updatedproject" }))
    {%>
<%: Html.ValidationSummary(true)%>
     <table   id="tablenoframe">
            <tr>
            <td class="label"><%: Html.LabelFor(model => model.ProjectName)%></td>
            <td class="editor-field">
                <%: Html.TextBox("ProjectName", Model.ProjectName, new { @readonly = "readonly" })%>
            </td>
            <td class="label"><%: Html.LabelFor(model => model.ProjectType)%></td>
            <td class="editor-field">
                <%: Html.TextBoxFor(model => model.ProjectType)%>
                <%: Html.ValidationMessageFor(model => model.ProjectType)%>
            </td>
            <td class="label"><%: Html.LabelFor(model => model.Importance)%></td>
            <td class="editor-field">
                <%: Html.TextBoxFor(model => model.Importance)%>
                <%: Html.ValidationMessageFor(model => model.Importance)%>
            </td>
            <td class="label"><%: Html.LabelFor(model => model.MainTechnology)%></td>
            <td class="editor-field">
                <%: Html.TextBoxFor(model => model.MainTechnology)%>
                <%: Html.ValidationMessageFor(model => model.MainTechnology)%>
            </td>
            </tr>

            <tr>
            <td class="label"><%: Html.LabelFor(model => model.BusinessField)%></td>
            <td class="editor-field">
                <%: Html.TextBoxFor(model => model.BusinessField)%>
                <%: Html.ValidationMessageFor(model => model.BusinessField)%>
            </td>
            <td class="label"><%: Html.LabelFor(model => model.ClientName)%></td>
            <td class="editor-field">
               <%: Html.DropDownList("ClientName", (SelectList)ViewData["ClientName"], "", new { style = "width:100px" })%>
                <%: Html.ValidationMessageFor(model => model.ClientName)%>
            </td>
            <td class="label"><%: Html.LabelFor(model => model.Department)%></td>
            <td class="editor-field">
                <%: Html.TextBoxFor(model => model.Department)%>
                <%: Html.ValidationMessageFor(model => model.Department)%>
            </td>
            <td class="label"><%: Html.LabelFor(model => model.ManagerId)%></td>
            <td class="editor-field">
                <%: Html.TextBoxFor(model => model.ManagerId)%>
                <%: Html.ValidationMessageFor(model => model.ManagerId)%>
            </td>
            </tr>

            <tr>
            <td class="label"><%: Html.LabelFor(model => model.ProjectStatus)%></td>
            <td class="editor-field"><%: Html.DropDownList ("ProjectStatus",(SelectList)ViewData ["ProjectStatus"],"")%></td>

            <td class="label"><%: Html.LabelFor(model => model.StartTime)%> </td>
            <td class="editor-field"><%: Html.TextBoxFor(model => model.StartTime )%></td>

            <td><%: Html.LabelFor(model => model.EndTime)%></td>
            <td class="editor-field"><%: Html.TextBoxFor(model => model.EndTime)%></td>
            
            <td colspan ="2" align ="left"><input type="submit" value="更新"  style ="margin-left:20px;" /></td>
            </tr>
            </table>
<%} %>

</div>